package com.shaoshaohuo.app.ui;

import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.shaoshaohuo.app.R;
import com.shaoshaohuo.app.net.ShopHttpConfig;

public class UserFarmAgreementActivity extends AppCompatActivity {
    /**
     * tobar
     */
    private ImageView order_tobar_back;
    private TextView order_tobar_enter;
    private ImageView order_tobar_right;
    private LinearLayout order_layout_topbar_left;
    private ImageView selfadaptionImageview;

    @Override

    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_user_farm_agreement);
        /**
         * tobar
         * */
        order_tobar_back = (ImageView) findViewById(R.id.imageview_topbar_left_backImage);
        order_tobar_back.setVisibility(View.VISIBLE);
        order_tobar_back.setImageResource(R.mipmap.return_key);
        order_tobar_enter = (TextView) findViewById(R.id.toolbar_topname);
        order_tobar_enter.setText("商家入驻");
        order_tobar_right = (ImageView) findViewById(R.id.imageview_message);
        order_tobar_right.setImageResource(R.mipmap.shenhe_kefu);
        order_tobar_right.setVisibility(View.VISIBLE);
        order_layout_topbar_left = (LinearLayout) findViewById(R.id.layout_topbar_left);
        order_layout_topbar_left.setVisibility(View.VISIBLE);
        order_tobar_back.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                finish();
            }
        });
        order_tobar_right.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                startActivity(ShopHttpConfig.phone());
            }
        });
        //750*1400
        float v = getResources().getDisplayMetrics().widthPixels / 750f;

        selfadaptionImageview = (ImageView) findViewById(R.id.iv);
        ViewGroup.LayoutParams layoutParams = selfadaptionImageview.getLayoutParams();
        layoutParams.width = getResources().getDisplayMetrics().widthPixels;
        layoutParams.height = (int) (1400 * v);

    }

}
